﻿@model RegistrationManagement.Models.RegEditViewModel

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Registration</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Registration.HardwardId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Registration.HardwardId)
            @Html.ValidationMessageFor(model => model.Registration.HardwardId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Registration.IssueDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Registration.IssueDate)
            @Html.ValidationMessageFor(model => model.Registration.IssueDate)
        </div>

    

        <div class="editor-label">
            @Html.LabelFor(model => model.Registration.ContactId)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Registration.ContactId, Model.Contacts, "select contact")
            @Html.ValidationMessageFor(model => model.Registration)
        </div>
        
         <div class="editor-label">
            @Html.LabelFor(model => model.Registration.ContractId)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Registration.ContractId, Model.Contracts, "select contract")
            @Html.ValidationMessageFor(model => model.Registration.ContractId)
        </div>
        
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
